<template>
  <div class="service" @click="gotoService">
    <div class="icon-contain">
      <i :class=iconType></i>
    </div>
    <div class="service-text">
      <div class="service-name">{{serviceName}}</div>
      <div class="service-desc">{{serviceDesc}}</div>
    </div>
  </div>
</template>

<script>
export default {
  name: "ServiceTemplate",
  props:{
    iconType:{
      type: String,
    },
    serviceName:{
      type:String
    },
    serviceDesc:{
      type:String
    },
    url:{
      type:String
    }
  },
  data(){
    return{

    }
  },
  methods:{
    gotoService(){
      this.$router.push(this.url)
    }
  }
}
</script>

<style scoped>
.service{
  display: flex;
  flex-flow: row;
  width: 300px;
  height: auto;
  transition: 0.3s;
  border-radius: 10px;
  margin:30px 5px 0  0;
  position: relative;
  left: 15px;
  top: -20px;
}
.service:hover{
  color: darkorange;
  box-shadow: 3px 2px 5px #5D6D7E ;
  cursor: pointer;
}
.service-text{
  display: flex;
  flex-flow: column;
  align-items:flex-start;
  justify-content: space-between;
  margin-left: 5px;
}
.service-name{
  font-size: 18px;
}
.service-desc{
  font-size: 14px;
}
.icon-contain{
  width: 60px;
  height: 60px;
  background-color: #2ebfe1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #000;
  border-radius: 10px;
}
i{
 font-size: 40px;
}
</style>